import Vue from 'vue'

export default {
  // 时间插件翻译配置
  date_locale: {
    days: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
    daysShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
    daysMin: ['日', '一', '二', '三', '四', '五', '六'],
    months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
    monthsShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
    // firstDayOfWeek: 1
  },
  // 滚动条样式
  // liulu: 2019/12/26 增加滚动条层级
  // liulu: 2020/04/09 修改滚动条宽度
  thumbStyle: {
    right: '0',
    borderRadius: '4px',
    backgroundColor: '#5f77fd',
    width: '8px',
    opacity: 0.5,
    'z-index': 19
  },
  // 用户指引组件配置
  user_guide: {
    stageBackground: '#d3d3d3',
    doneBtnText: '完成',
    closeBtnText: '关闭',
    nextBtnText: '下一步',
    prevBtnText: '上一步'
  },
  event: new Vue(),

  // 接口地址
  // sirio: 2020/03/01 重新整理
  upmsUrl: '/upms',
  emsUrl: '/ems',
  schemaUrl: '/schema',
  tpmUrl: '/tpm',
  processUrl: '/process',
  planningUrl: '/planning',
  fileUrl: '/file',
  machinestatusUrl: '/machinestatus',
  bmsUrl: '/bms',
  reportUrl: '/reporting',
  cutterUrl: '/cutter', // 刀具地址
  miotUrl: '/miot',
  datacenterUrl: '/datacenter',
  messagestationUrl: '/message-station', // 消息设置
  ems: '/ems',
  wms: '/wms',
  energy: '/energy', // 能耗

  // mqtt地址
  // sirio: 2019/12/20
  mqttConfig: {
    MQTT_SERVICE: process.env.MQTT_SERVER, // mqtt服务器地址
    MQRR_PORT: process.env.MQTT_SERVER_PORT, // 端口
    MQTT_USERNAME: '', // 用户名
    MQTT_PASSWORD: '', // 密码
    MQTT_TOPIC: {
      detailsTopic: {
        subscribeTopic: '/moses/monitor/ACTUAL/',
        sendTopic: '/moses/monitor/command/',
        type: '1'
      },
      processTopic: {
        subscribeTopic: '/moses/monitor/ACTUAL/',
        sendTopic: '/moses/monitor/command/',
        type: '1'
      },
      timeLineTopic: {
        subscribeTopic: '/moses/monitor/DNC/',
        sendTopic: '/moses/monitor/command/',
        type: '2'
      },
      statusTopic: {
        subscribeTopic: '/moses/machine/status/',
        sendTopic: '',
        type: ''
      },
      productivityTopic: {
        subscribeTopic: '/moses/machine/productivity/',
        sendTopic: '',
        type: ''
      },
      programName: {
        subscribeTopic: '/moses/machine/programName/',
        sendTopic: '',
        type: ''
      },
      processCount: {
        subscribeTopic: '/moses/machine/processCount/',
        sendTopic: '',
        type: ''
      },
      productivity: {
        subscribeTopic: '/moses/machine/productivity/',
        sendTopic: '',
        type: ''
      },
      machineFileInfo: {
        subscribeTopic: '/moses/command/result/',
        sendTopic: '/moses/command/exec/',
        type: '2'
      },
      realTimeStatus: {
        subscribeTopic: '/moses/machine/realTimeStatus/',
        sendTopic: '',
        type: ''
      },
      machineFileSendInfo: {
        subscribeTopic: '/moses/ftp/sendInfo/',
        sendTopic: '',
        type: ''
      },
      machineFileSendResult: {
        subscribeTopic: '/moses/ftp/sendResult/',
        sendTopic: '',
        type: ''
      },
      normalWorkpiece: {
        subscribeTopic: '/moses/machine/normal_workpiece/',
        sendTopic: '',
        type: ''
      },
      onlineProcessDetail: {
        subscribeTopic: '/moses/monitor/DNC/',
        sendTopic: '/moses/monitor/command/',
        type: '2'
      }
    }
  },
  socketConfig: {
    SOCKET_PATH: process.env.SOCKET_PATH, // socket地址
    SOCKET_USERNAME: '', // 用户名
    SOCKET_PASSWORD: '', // 密码
    SOCKET_TOPIC: {
      // 实时数据详情接受盒子相关信息
      PLC: {
        subscribeTopic: '/topic/moses/monitor/PLC/ACTUAL/',
        sendTopic: '/moses/monitor/command/',
        type: ''
      },
      // 实时数据详情接受盒子相关信息
      boxTypeTopic: {
        subscribeTopic: '/topic/device/unbind/box/',
        sendTopic: '/moses/monitor/command/',
        type: ''
      },
      // 用户自定义数据
      userdataTopic: {
        subscribeTopic: '/topic/moses/monitor/userdata/',
        sendTopic: '/moses/monitor/command/',
        type: ''
      },
      // 消息订阅
      messageTopic: {
        subscribeTopic: '/topic/station/message/',
        sendTopic: '/moses/monitor/command/',
        type: ''
      },
      processTopic: {
        subscribeTopic: '/topic/moses/monitor/ACTUAL/',
        sendTopic: '/moses/monitor/command/',
        type: '1'
      },
      timeLineTopic: {
        subscribeTopic: '/topic/moses/monitor/DNC/',
        sendTopic: '/moses/monitor/command/',
        type: '2'
      },
      statusTopic: {
        subscribeTopic: '/topic/moses/machine/status/',
        sendTopic: '',
        type: ''
      },
      // ems状态订阅
      emsStatusTopic: {
        subscribeTopic: '/topic/ems/moses/machine/status/',
        sendTopic: '',
        type: ''
      },
      programName: {
        subscribeTopic: '/topic/moses/machine/programName/',
        sendTopic: '',
        type: ''
      },
      processCount: {
        subscribeTopic: '/topic/moses/machine/processCount/',
        sendTopic: '',
        type: ''
      },
      productivity: {
        subscribeTopic: '/topic/moses/machine/productivity/',
        sendTopic: '',
        type: ''
      },
      realTimeCount: {
        subscribeTopic: '/topic/moses/machine/realTimeCount/',
        sendTopic: '',
        type: ''
      },
      machineFileInfo: {
        subscribeTopic: '/topic/moses/command/result/',
        sendTopic: '/moses/command/exec/',
        type: '2'
      },
      realTimeStatus: {
        subscribeTopic: '/topic/moses/machine/realTimeStatus/',
        sendTopic: '',
        type: ''
      },
      // ems
      emsPealTimeStatus: {
        subscribeTopic: '/topic/ems/moses/machine/realTimeStatus/',
        sendTopic: '',
        type: ''
      },
      machineFileSendInfo: {
        subscribeTopic: '/topic/moses/ftp/sendInfo/',
        sendTopic: '',
        type: ''
      },
      machineFileSendResult: {
        subscribeTopic: '/topic/moses/ftp/sendResult/',
        sendTopic: '',
        type: ''
      },
      machineFileSendResultNew: {
        subscribeTopic: '/topic/newBox/file/',
        sendTopic: '',
        type: ''
      },
      normalWorkpiece: {
        subscribeTopic: '/topic/moses/machine/normal_workpiece/',
        sendTopic: '',
        type: ''
      },
      // ems
      emsNormalWorkpiece: {
        subscribeTopic: '/topic/ems/moses/machine/normal_workpiece/',
        sendTopic: '',
        type: ''
      },
      onlineProcessDetail: {
        subscribeTopic: '/topic/moses/monitor/DNC/ACTUAL/',
        sendTopic: '/moses/monitor/command/',
        type: '2'
      },
      // ems
      emsOnlineProcessDetail: {
        subscribeTopic: '/topic/ems/moses/monitor/DNC/ACTUAL/',
        sendTopic: '',
        type: '2'
      },
      uploadFile: {
        subscribeTopic: '/topic/upload/specifyPath/'
      },
      test: {
        subscribeTopic: '/topic/bulletScreen',
        sendTopic: '',
        type: ''
      },
      energyRunning: {
        subscribeTopic: '/topic/moses/monitor/energy/ACTUAL/',
        sendTopic: '/moses/monitor/energy/ACTUAL/',
        type: ''
      },
      energyStatus: {
        subscribeTopic: '/topic/energyData/energyStates',
        sendTopic: '/energyData/energyStates/',
        type: ''
      }
    }
  },

  // oss文件路径
  ossFilePath: {
    processProgramDir: `processProgram_`, // 工艺程序目录
    processFileDir: `processFile_`, // 工艺程序目录
    deviceImagesDir: `deviceImages_`, // 设备图像目录
    avatarImagesDir: `avatarImages_`, // 用户头像目录
    logoImagesDir: `custom_`, // 用户自定义logo目录
    excelDir: `excel_`, // 导入的excel目录
    documentDir: `document_`, // 文档地址
    repairDir: 'repair_', // 维修完成
    emsDeviceDir: 'emsDevice_'
  },

  // 系统更新资源服务器
  updateServiceUrl: process.env.UPDATE_SERVICE_URL,

  // 埋点数据
  statData: {
    roleMenu: {
      pc: { id: 'dlp010201', name: 'pc端界面' },
      mobile: { id: 'dlp010202', name: '手机端界面' }
    },
    userMana: {
      searchByNum: { id: 'dlp010301', name: '按照员工编号搜索' },
      searchByName: { id: 'dlp010302', name: '按照姓名搜索' },
      searchByPhone: { id: 'dlp010303', name: '按照手机号码搜索' },
      batchDel: { id: 'dlp010304', name: '批量删除' },
      downloadTemplate: { id: 'dlp010305', name: '下载模板' },
      batchImport: { id: 'dlp010306', name: '批量导入' },
      posSet: { id: 'dlp010306', name: '工位设置' },
      roleSet: { id: 'dlp010306', name: '角色设定' },
      detail: { id: 'dlp010306', name: '详情' }
    },
    reason: {
      badReasonPage: { id: 'dlp010501', name: '不良原因界面' },
      giveAwayReasonPage: { id: 'dlp010502', name: '让步原因界面' },
      stopReasonPage: { id: 'dlp010503', name: '停机原因界面' }
    },
    factoryCalendar: {
      classMana: { id: 'dlp020401', name: '班制管理' },
      teamLayout: { id: 'dlp020402', name: '班组排班' }
    },
    equipmentRecord: {
      searchByNum: { id: 'dlp030101', name: '按照设备编号搜索' },
      searchByName: { id: 'dlp030102', name: '按照设备名称搜索' },
      searchByFactory: { id: 'dlp030103', name: '按照设备厂家搜索' },
      searchByModel: { id: 'dlp030104', name: '按照设备型号搜索' },
      batchDel: { id: 'dlp030105', name: '批量删除' },
      downloadTemplate: { id: 'dlp030106', name: '下载模板' },
      batchImport: { id: 'dlp030107', name: '批量导入' },
      addMachine: { id: 'dlp030108', name: '添加设备' },
      printQRCode: { id: 'dlp030109', name: '打印二维码' },
      detail: { id: 'dlp030110', name: '详情' }
    },
    productDefine: {
      searchByNum: { id: 'dlp040101', name: '按照产品编号搜索' },
      searchByName: { id: 'dlp040102', name: '按照产品名称搜索' },
      batchDel: { id: 'dlp040103', name: '批量删除' },
      downloadTemplate: { id: 'dlp040104', name: '下载模板' },
      batchImport: { id: 'dlp040105', name: '批量导入' },
      addProduct: { id: 'dlp040106', name: '添加产品' },
      detail: { id: 'dlp040107', name: '详情' }
    },
    processDefine: {
      searchByNum: { id: 'dlp040201', name: '按照工序编号搜索' },
      searchByName: { id: 'dlp040202', name: '按照工序名称搜索' },
      batchDel: { id: 'dlp040203', name: '批量删除' },
      downloadTemplate: { id: 'dlp040204', name: '下载模板' },
      batchImport: { id: 'dlp040205', name: '批量导入' },
      addProcess: { id: 'dlp040206', name: '添加工序' }
    },
    craftCenter: {
      searchByNum: { id: 'dlp040301', name: '按照产品编号搜索' },
      searchByName: { id: 'dlp040302', name: '按照产品名称搜索' },
      addCraftRoute: { id: 'dlp040303', name: '工艺路线创建' },
      editCraftRoute: { id: 'dlp040304', name: '编辑' },
      delCraftRoute: { id: 'dlp040305', name: '删除' }
    },
    plantPlan: {
      searchByPlanNum: { id: 'dlp050101', name: '按照计划编号搜索' },
      searchByOrderNum: { id: 'dlp050102', name: '按照订单号搜索' },
      searchByMaterialNum: { id: 'dlp050103', name: '按照产品编号搜索' },
      searchByMaterialName: { id: 'dlp050104', name: '按照产品名称搜索' },
      batchDel: { id: 'dlp050105', name: '批量删除' },
      downloadTemplate: { id: 'dlp050106', name: '下载模板' },
      batchImport: { id: 'dlp050107', name: '批量导入' },
      add: { id: 'dlp050108', name: '新建' },
      planBreakDown: { id: 'dlp050109', name: '计划分解' },
      relieve: { id: 'dlp050110', name: '解除' },
      freeze: { id: 'dlp050111', name: '冻结' },
      unfreeze: { id: 'dlp050112', name: '解冻' },
      lock: { id: 'dlp050113', name: '锁定' },
      unlock: { id: 'dlp050114', name: '解锁' },
      copyAdd: { id: 'dlp050115', name: '复制新建' },
      edit: { id: 'dlp050116', name: '编辑' },
      del: { id: 'dlp050117', name: '删除' },
      planlook: { id: 'dlp050118', name: '下级计划查看' },
      planAdjust: { id: 'dlp050119', name: '工序计划调整' },
      planStatus: { id: 'dlp050120', name: '计划状态' }
    },
    processPlan: {
      searchByPlantPlanNum: { id: 'dlp050201', name: '按照车间计划编号搜索' },
      searchByPlanNum: { id: 'dlp050202', name: '按照计划编号搜索' },
      searchByMaterialNum: { id: 'dlp050203', name: '按照产品编号搜索' },
      searchByMaterialName: { id: 'dlp050204', name: '按照产品名称搜索' },
      edit: { id: 'dlp050205', name: '编辑' },
      del: { id: 'dlp050206', name: '删除' }
    },
    productionDispatch: {
      dispatch: { id: 'dlp050301', name: '拖动派工' },
      list: { id: 'dlp050302', name: '已派工单列表查询' },
      move: { id: 'dlp050303', name: '工单移动' },
      adjust: { id: 'dlp050304', name: '工单调整' },
      del: { id: 'dlp050305', name: '工单删除' },
      setMove: { id: 'dlp050306', name: '设为不可移动/可移动' }
    },
    planProgress: {
      searchByProductName: { id: 'dlp050401', name: '按照产品名称搜索' },
      searchByProductNum: { id: 'dlp050402', name: '按照产品编号搜索' },
      searchByOrderNum: { id: 'dlp050403', name: '按照订单号搜索' }
    },
    manMachineBind: {
      searchByMachineName: { id: 'dlp060101', name: '按照设备名称搜索' },
      searchByOperater: { id: 'dlp060102', name: '按照操作员姓名搜索' },
      searchByTechnician: { id: 'dlp060103', name: '按照技术员姓名搜索' },
      unbind: { id: 'dlp060104', name: '解绑' },
      bind: { id: 'dlp060105', name: '绑定' },
      batchBindOperater: { id: 'dlp060106', name: '批量绑定操作员' },
      batchBindTechnician: { id: 'dlp060107', name: '批量绑定技术员' },
      batchUnbindOperater: { id: 'dlp060108', name: '批量解绑操作员' },
      batchUnbindTechnician: { id: 'dlp060109', name: '批量解绑技术员' },
      bindHistory: { id: 'dlp060110', name: '绑定历史' }
    },
    processOrder: {
      searchByWorkOrderNum: { id: 'dlp060201', name: '按照工单号搜索' },
      searchByOrderNum: { id: 'dlp060202', name: '按照订单号搜索' },
      searchByProductName: { id: 'dlp060203', name: '按照产品名称搜索' },
      searchByMachine: { id: 'dlp060204', name: '按照加工设备搜索' },
      detail: { id: 'dlp060205', name: '详情' },
      orderBack: { id: 'dlp060206', name: '工单打回' },
      revisedYield: { id: 'dlp060207', name: '修正产量' },
      forceOver: { id: 'dlp060208', name: '强制完工' },
      forceClose: { id: 'dlp060209', name: '强制关闭' }
    },
    qualityOrder: {
      searchByQualityOrderNum: { id: 'dlp060301', name: '按照质检单号搜索' },
      searchByOrderNum: { id: 'dlp060302', name: '按照订单号搜索' },
      searchByProductName: { id: 'dlp060303', name: '按照产品名称搜索' },
      detail: { id: 'dlp060304', name: '详情' },
      edit: { id: 'dlp060305', name: '修改' }
    },
    machine: {
      searchByMachineNum: { id: 'dlp070101', name: '按照设备编号搜索' },
      searchByMachineName: { id: 'dlp070102', name: '按照设备名称搜索' },
      searchByMachineModel: { id: 'dlp070103', name: '按照设备型号搜索' },
      searchByMachineType: { id: 'dlp070104', name: '按照设备类型搜索' },
      detail: { id: 'dlp0702', name: '详情' },
      process: { id: 'dlp0703', name: '实时加工' },
      timeline: { id: 'dlp0704', name: '时间线' },
      'normal-cycle': { id: 'dlp070401', name: '正常循环明细' },
      'downtime-detail': { id: 'dlp070402', name: '停机时间明细' },
      'warning-detail': { id: 'dlp070403', name: '报警明细' },
      'close-detail': { id: 'dlp070404', name: '离线明细' },
      'abnormal-list': { id: 'dlp070405', name: '异常循环明细' }
    },
    localCloud: {
      local: {
        rename: { id: 'dlp080101', name: '本地文件重命名' },
        edit: { id: 'dlp080102', name: '本地编辑' },
        del: { id: 'dlp080103', name: '本地删除' },
        program: { id: 'dlp080104', name: '本地到云端文件传输' }
      },
      cloud: {
        rename: { id: 'dlp080105', name: '云端文件重命名' },
        edit: { id: 'dlp080106', name: '云端编辑' },
        del: { id: 'dlp080107', name: '云端删除' },
        program: { id: 'dlp080108', name: '云端到本地文件传输' }
      },
      record: { id: 'dlp080109', name: '传输记录' },
      version: { id: 'dlp080110', name: '版本履历' },
      compare: { id: 'dlp080111', name: '对比列表' }
    },
    localDevice: {
      local: {
        rename: { id: 'dlp080201', name: '本地文件重命名' },
        edit: { id: 'dlp080202', name: '本地编辑' },
        del: { id: 'dlp080203', name: '本地删除' },
        program: { id: 'dlp080204', name: '本地到设备文件传输' }
      },
      device: {
        rename: { id: 'dlp080205', name: '设备文件重命名' },
        edit: { id: 'dlp080206', name: '设备编辑' },
        del: { id: 'dlp080207', name: '设备删除' },
        add: { id: 'dlp080208', name: '设备文件新建' },
        program: { id: 'dlp080209', name: '设备到本地文件传输' }
      },
      record: { id: 'dlp080210', name: '传输记录' },
      compare: { id: 'dlp080211', name: '对比列表' }
    },
    deviceCloud: {
      device: {
        rename: { id: 'dlp080301', name: '设备文件重命名' },
        edit: { id: 'dlp080302', name: '设备编辑' },
        del: { id: 'dlp080303', name: '设备删除' },
        add: { id: 'dlp080305', name: '设备文件新建' },
        program: { id: 'dlp080304', name: '设备到云端文件传输' }
      },
      cloud: {
        rename: { id: 'dlp080306', name: '云端文件重命名' },
        edit: { id: 'dlp080307', name: '云端编辑' },
        del: { id: 'dlp080308', name: '云端删除' },
        program: { id: 'dlp080309', name: '云端到设备文件传输' }
      },
      record: { id: 'dlp080310', name: '传输记录' },
      version: { id: 'dlp080311', name: '版本履历' },
      compare: { id: 'dlp080312', name: '对比列表' }
    }
  }
}
